<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<!-- 
		<ul>
			<li mean='热情'>red</li>
			<li mean='冷静'>green</li>
			<li mean='生机'>blue</li>
		</ul> -->
		
		<script type="text/javascript">
			var colors = ['red', 'green', 'blue'];
			var colorMeans = ['热情', '冷静', '生机'];
			var ul = document.createElement('ul');
			for(var i in colors) {
				console.log(i);
				var li = document.createElement('li');
				var txt = document.createTextNode(colorMeans[i]);
				// 将文本节点追加到li上
				li.appendChild(txt);
				// 将li追加到ul上
				ul.appendChild(li);
			}
			
			document.body.appendChild(ul);
		</script>
	</body>
</html>
